package code.part02_objectOriented;

/**
 * @author: ZJT
 * @Time: 2021/7/7
 * @Description: this
 */
public class P03_This {

    String name;
    int age;

    public P03_This(){
        this("无参构造");
    }

    public P03_This(String name){
        this.name = name;
        System.out.println(this.name);
        this.run("有参构造");
    }

    public P03_This(String name, int age){
        this(name);
    }

    public static void main(String[] args) {
        P03_This td = new P03_This("zhangsan",12);
        P03_This t2 = new P03_This();
    }

    public void run(String name){
        super.toString();
        System.out.println("run");
        System.out.println(this.name);
        System.out.println(name);
    }

}
